#encoding: utf-8
class Appointment < ApplicationRecord
  belongs_to :member
  belongs_to :member_card
  belongs_to :timetable
  belongs_to :order
  has_one :course, through: :timetable, source: :course
  has_one :classroom, through: :timetable, source: :classroom
  has_one :company, through: :timetable, source: :company
  has_one :store, through: :timetable, source: :store
  has_one :coach, through: :timetable, source: :coach
  enum status: [:canceled, :appointed, :absent, :signed, :suspended, :commented]
end
